#include<iostream> 
using namespace std;
const int NUM=9;
double averagescore(double *arr,int n);
int main()
{
	double arr[NUM];
	cout<<"please enter"<<NUM<<"specilist scores:\n";
	int i=0;
	while(i<NUM)
	{
	cin>>arr[i++];
	cin.get();
	}
	cout<<"\nThe average score is:"<<averagescore(arr,NUM)<<"\n";
	return 0;
}
double averagescore(double *arr,int n)
{
	double max=arr[0];
	double min=arr[0];
	double sum=arr[0];
	int i=1,j=1;
	for(;i<n;++i)
	{
		sum+=arr[i];
		if(arr[i]>max)
		max=arr[i];
	}
	for(;j<n;++j)
	{
		if(arr[j]<min)
		min=arr[j];
	}
	sum-=max;
	sum-=min;
	return sum/(n-2);
}
